using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;

namespace Hawkeye.Specs
{
  [TestFixture]
  public class Story_Hawk
  {
    [Test, Ignore]
    public void Example1()
    {
      Given_input("class T { }");
      Result_should_contain("<td>T</td>");
      Result_should_contain("<td>1</td>");
    }

    [Test, Ignore]
    public void Example2()
    {
      Given_input("class T { public T() { } }");
      Result_should_contain("<td>T</td>");
      Result_should_contain("<td>2</td>");
    }

    void Result_should_contain(string text)
    {
      Assert.IsTrue(result.Contains(text), "Expected '" + text + "' somewhere in '" + result + "'");
    }

    string result;
    void Given_input(string text)
    {
      HawkService service = new HawkService(new FrequencyTableProducer());
      Hawk hawk = new Hawk(service);
      result = hawk.Handle(text);
    }
  }

}
